<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Event_comment_model extends CI_Model {
    public $table = 'event_comments';
    public $primary = 'id';
    
    function add($data) {
        $this->db->insert($this->table, $data);
    }
    
    function getCommentByEventId($event_id) {
        $query = $this->db->query("SELECT * FROM {$this->table}
  	                                 WHERE `event_id` = {$event_id}");
        return $query->result_array();
    }
}
?>
